3.571 \(\int \frac{\cos ^4(c+d x)}{(a+b \tan (c+d x))^3} \, dx\)

Optimal. Leaf size=295 \[ \frac{3 a b \left (6 a^2 b^2+a^4-27 b^4\right )}{8 d \left (a^2+b^2\right )^4 (a+b \tan (c+d x))}+\frac{3 b \left (5 a^2 b^2+a^4-4 b^4\right )}{8 d \left (a^2+b^2\right )^3 (a+b \tan (c+d x))^2}-\frac{\cos ^2(c+d x) \left (2 b \left (a^2-3 b^2\right )-a \left (3 a^2+11 b^2\right ) \tan (c+d x)\right )}{8 d \left (a^2+b^2\right )^2 (a+b \tan (c+d x))^2}+\frac{\cos ^4(c+d x) (a \tan (c+d x)+b)}{4 d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}+\frac{3 b^5 \left (7 a^2-b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{d \left (a^2+b^2\right )^5}+\frac{3 a x \left (7 a^4 b^2+35 a^2 b^4+a^6-35 b^6\right )}{8 \left (a^2+b^2\right )^5} \]

[Out]

(3*a*(a^6 + 7*a^4*b^2 + 35*a^2*b^4 - 35*b^6)*x)/(8*(a^2 + b^2)^5) + (3*b^5*(7*a^2 - b^2)*Log[a*Cos[c + d*x] +
b*Sin[c + d*x]])/((a^2 + b^2)^5*d) + (3*b*(a^4 + 5*a^2*b^2 - 4*b^4))/(8*(a^2 + b^2)^3*d*(a + b*Tan[c + d*x])^2
) + (Cos[c + d*x]^4*(b + a*Tan[c + d*x]))/(4*(a^2 + b^2)*d*(a + b*Tan[c + d*x])^2) + (3*a*b*(a^4 + 6*a^2*b^2 -
 27*b^4))/(8*(a^2 + b^2)^4*d*(a + b*Tan[c + d*x])) - (Cos[c + d*x]^2*(2*b*(a^2 - 3*b^2) - a*(3*a^2 + 11*b^2)*T
an[c + d*x]))/(8*(a^2 + b^2)^2*d*(a + b*Tan[c + d*x])^2)

________________________________________________________________________________________

Rubi [A]  time = 0.349339, antiderivative size = 295, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3506, 741, 823, 801, 635, 203, 260} \[ \frac{3 a b \left (6 a^2 b^2+a^4-27 b^4\right )}{8 d \left (a^2+b^2\right )^4 (a+b \tan (c+d x))}+\frac{3 b \left (5 a^2 b^2+a^4-4 b^4\right )}{8 d \left (a^2+b^2\right )^3 (a+b \tan (c+d x))^2}-\frac{\cos ^2(c+d x) \left (2 b \left (a^2-3 b^2\right )-a \left (3 a^2+11 b^2\right ) \tan (c+d x)\right )}{8 d \left (a^2+b^2\right )^2 (a+b \tan (c+d x))^2}+\frac{\cos ^4(c+d x) (a \tan (c+d x)+b)}{4 d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}+\frac{3 b^5 \left (7 a^2-b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{d \left (a^2+b^2\right )^5}+\frac{3 a x \left (7 a^4 b^2+35 a^2 b^4+a^6-35 b^6\right )}{8 \left (a^2+b^2\right )^5} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^4/(a + b*Tan[c + d*x])^3,x]

[Out]

(3*a*(a^6 + 7*a^4*b^2 + 35*a^2*b^4 - 35*b^6)*x)/(8*(a^2 + b^2)^5) + (3*b^5*(7*a^2 - b^2)*Log[a*Cos[c + d*x] +
b*Sin[c + d*x]])/((a^2 + b^2)^5*d) + (3*b*(a^4 + 5*a^2*b^2 - 4*b^4))/(8*(a^2 + b^2)^3*d*(a + b*Tan[c + d*x])^2
) + (Cos[c + d*x]^4*(b + a*Tan[c + d*x]))/(4*(a^2 + b^2)*d*(a + b*Tan[c + d*x])^2) + (3*a*b*(a^4 + 6*a^2*b^2 -
 27*b^4))/(8*(a^2 + b^2)^4*d*(a + b*Tan[c + d*x])) - (Cos[c + d*x]^2*(2*b*(a^2 - 3*b^2) - a*(3*a^2 + 11*b^2)*T
an[c + d*x]))/(8*(a^2 + b^2)^2*d*(a + b*Tan[c + d*x])^2)

Rule 3506

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rule 741

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> -Simp[((d + e*x)^(m + 1)*(a*e + c*d*x)*(
a + c*x^2)^(p + 1))/(2*a*(p + 1)*(c*d^2 + a*e^2)), x] + Dist[1/(2*a*(p + 1)*(c*d^2 + a*e^2)), Int[(d + e*x)^m*
Simp[c*d^2*(2*p + 3) + a*e^2*(m + 2*p + 3) + c*e*d*(m + 2*p + 4)*x, x]*(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a
, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && LtQ[p, -1] && IntQuadraticQ[a, 0, c, d, e, m, p, x]

Rule 823

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> -Simp[((d + e*x)^(
m + 1)*(f*a*c*e - a*g*c*d + c*(c*d*f + a*e*g)*x)*(a + c*x^2)^(p + 1))/(2*a*c*(p + 1)*(c*d^2 + a*e^2)), x] + Di
st[1/(2*a*c*(p + 1)*(c*d^2 + a*e^2)), Int[(d + e*x)^m*(a + c*x^2)^(p + 1)*Simp[f*(c^2*d^2*(2*p + 3) + a*c*e^2*
(m + 2*p + 3)) - a*c*d*e*g*m + c*e*(c*d*f + a*e*g)*(m + 2*p + 4)*x, x], x], x] /; FreeQ[{a, c, d, e, f, g}, x]
 && NeQ[c*d^2 + a*e^2, 0] && LtQ[p, -1] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p])

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{\cos ^4(c+d x)}{(a+b \tan (c+d x))^3} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{(a+x)^3 \left (1+\frac{x^2}{b^2}\right )^3} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\cos ^4(c+d x) (b+a \tan (c+d x))}{4 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}-\frac{b \operatorname{Subst}\left (\int \frac{-3 \left (2+\frac{a^2}{b^2}\right )-\frac{5 a x}{b^2}}{(a+x)^3 \left (1+\frac{x^2}{b^2}\right )^2} \, dx,x,b \tan (c+d x)\right )}{4 \left (a^2+b^2\right ) d}\\ &=\frac{\cos ^4(c+d x) (b+a \tan (c+d x))}{4 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}-\frac{\cos ^2(c+d x) \left (2 b \left (a^2-3 b^2\right )-a \left (3 a^2+11 b^2\right ) \tan (c+d x)\right )}{8 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}+\frac{b^5 \operatorname{Subst}\left (\int \frac{\frac{3 \left (a^4+a^2 b^2+8 b^4\right )}{b^6}+\frac{3 a \left (3 a^2+11 b^2\right ) x}{b^6}}{(a+x)^3 \left (1+\frac{x^2}{b^2}\right )} \, dx,x,b \tan (c+d x)\right )}{8 \left (a^2+b^2\right )^2 d}\\ &=\frac{\cos ^4(c+d x) (b+a \tan (c+d x))}{4 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}-\frac{\cos ^2(c+d x) \left (2 b \left (a^2-3 b^2\right )-a \left (3 a^2+11 b^2\right ) \tan (c+d x)\right )}{8 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}+\frac{b^5 \operatorname{Subst}\left (\int \left (\frac{6 \left (-a^4-5 a^2 b^2+4 b^4\right )}{b^4 \left (a^2+b^2\right ) (a+x)^3}+\frac{3 a \left (-a^4-6 a^2 b^2+27 b^4\right )}{b^4 \left (a^2+b^2\right )^2 (a+x)^2}+\frac{24 \left (7 a^2-b^2\right )}{\left (a^2+b^2\right )^3 (a+x)}+\frac{3 \left (a \left (a^6+7 a^4 b^2+35 a^2 b^4-35 b^6\right )-8 b^4 \left (7 a^2-b^2\right ) x\right )}{b^4 \left (a^2+b^2\right )^3 \left (b^2+x^2\right )}\right ) \, dx,x,b \tan (c+d x)\right )}{8 \left (a^2+b^2\right )^2 d}\\ &=\frac{3 b^5 \left (7 a^2-b^2\right ) \log (a+b \tan (c+d x))}{\left (a^2+b^2\right )^5 d}+\frac{3 b \left (a^4+5 a^2 b^2-4 b^4\right )}{8 \left (a^2+b^2\right )^3 d (a+b \tan (c+d x))^2}+\frac{\cos ^4(c+d x) (b+a \tan (c+d x))}{4 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}+\frac{3 a b \left (a^4+6 a^2 b^2-27 b^4\right )}{8 \left (a^2+b^2\right )^4 d (a+b \tan (c+d x))}-\frac{\cos ^2(c+d x) \left (2 b \left (a^2-3 b^2\right )-a \left (3 a^2+11 b^2\right ) \tan (c+d x)\right )}{8 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}+\frac{(3 b) \operatorname{Subst}\left (\int \frac{a \left (a^6+7 a^4 b^2+35 a^2 b^4-35 b^6\right )-8 b^4 \left (7 a^2-b^2\right ) x}{b^2+x^2} \, dx,x,b \tan (c+d x)\right )}{8 \left (a^2+b^2\right )^5 d}\\ &=\frac{3 b^5 \left (7 a^2-b^2\right ) \log (a+b \tan (c+d x))}{\left (a^2+b^2\right )^5 d}+\frac{3 b \left (a^4+5 a^2 b^2-4 b^4\right )}{8 \left (a^2+b^2\right )^3 d (a+b \tan (c+d x))^2}+\frac{\cos ^4(c+d x) (b+a \tan (c+d x))}{4 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}+\frac{3 a b \left (a^4+6 a^2 b^2-27 b^4\right )}{8 \left (a^2+b^2\right )^4 d (a+b \tan (c+d x))}-\frac{\cos ^2(c+d x) \left (2 b \left (a^2-3 b^2\right )-a \left (3 a^2+11 b^2\right ) \tan (c+d x)\right )}{8 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}-\frac{\left (3 b^5 \left (7 a^2-b^2\right )\right ) \operatorname{Subst}\left (\int \frac{x}{b^2+x^2} \, dx,x,b \tan (c+d x)\right )}{\left (a^2+b^2\right )^5 d}+\frac{\left (3 a b \left (a^6+7 a^4 b^2+35 a^2 b^4-35 b^6\right )\right ) \operatorname{Subst}\left (\int \frac{1}{b^2+x^2} \, dx,x,b \tan (c+d x)\right )}{8 \left (a^2+b^2\right )^5 d}\\ &=\frac{3 a \left (a^6+7 a^4 b^2+35 a^2 b^4-35 b^6\right ) x}{8 \left (a^2+b^2\right )^5}+\frac{3 b^5 \left (7 a^2-b^2\right ) \log (\cos (c+d x))}{\left (a^2+b^2\right )^5 d}+\frac{3 b^5 \left (7 a^2-b^2\right ) \log (a+b \tan (c+d x))}{\left (a^2+b^2\right )^5 d}+\frac{3 b \left (a^4+5 a^2 b^2-4 b^4\right )}{8 \left (a^2+b^2\right )^3 d (a+b \tan (c+d x))^2}+\frac{\cos ^4(c+d x) (b+a \tan (c+d x))}{4 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}+\frac{3 a b \left (a^4+6 a^2 b^2-27 b^4\right )}{8 \left (a^2+b^2\right )^4 d (a+b \tan (c+d x))}-\frac{\cos ^2(c+d x) \left (2 b \left (a^2-3 b^2\right )-a \left (3 a^2+11 b^2\right ) \tan (c+d x)\right )}{8 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}\\ \end{align*}

Mathematica [B]  time = 6.24788, size = 596, normalized size = 2.02 \[ \frac{b^5 \left (\frac{\cos ^4(c+d x) \left (a b \tan (c+d x)+b^2\right )}{4 b^6 \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac{\frac{\cos ^2(c+d x) \left (b \left (-3 a \left (a^2+2 b^2\right )-5 a b^2\right ) \tan (c+d x)+5 a^2 b^2-3 b^2 \left (a^2+2 b^2\right )\right )}{2 b^4 \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac{\left (3 \left (a^2 b^2+a^4+8 b^4\right )-3 a^2 \left (3 a^2+11 b^2\right )\right ) \left (-\frac{2 a}{\left (a^2+b^2\right )^2 (a+b \tan (c+d x))}-\frac{1}{2 \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac{\left (-\frac{a^3-3 a b^2}{\sqrt{-b^2}}+3 a^2-b^2\right ) \log \left (\sqrt{-b^2}-b \tan (c+d x)\right )}{2 \left (a^2+b^2\right )^3}+\frac{\left (3 a^2-b^2\right ) \log (a+b \tan (c+d x))}{\left (a^2+b^2\right )^3}-\frac{\left (\frac{a^3-3 a b^2}{\sqrt{-b^2}}+3 a^2-b^2\right ) \log \left (\sqrt{-b^2}+b \tan (c+d x)\right )}{2 \left (a^2+b^2\right )^3}\right )+3 a \left (3 a^2+11 b^2\right ) \left (-\frac{1}{\left (a^2+b^2\right ) (a+b \tan (c+d x))}-\frac{\left (2 a-\frac{a^2-b^2}{\sqrt{-b^2}}\right ) \log \left (\sqrt{-b^2}-b \tan (c+d x)\right )}{2 \left (a^2+b^2\right )^2}+\frac{2 a \log (a+b \tan (c+d x))}{\left (a^2+b^2\right )^2}-\frac{\left (\frac{a^2-b^2}{\sqrt{-b^2}}+2 a\right ) \log \left (\sqrt{-b^2}+b \tan (c+d x)\right )}{2 \left (a^2+b^2\right )^2}\right )}{2 b^2 \left (a^2+b^2\right )}}{4 b^2 \left (a^2+b^2\right )}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^4/(a + b*Tan[c + d*x])^3,x]

[Out]

(b^5*((Cos[c + d*x]^4*(b^2 + a*b*Tan[c + d*x]))/(4*b^6*(a^2 + b^2)*(a + b*Tan[c + d*x])^2) - ((Cos[c + d*x]^2*
(5*a^2*b^2 - 3*b^2*(a^2 + 2*b^2) + b*(-5*a*b^2 - 3*a*(a^2 + 2*b^2))*Tan[c + d*x]))/(2*b^4*(a^2 + b^2)*(a + b*T
an[c + d*x])^2) - ((-3*a^2*(3*a^2 + 11*b^2) + 3*(a^4 + a^2*b^2 + 8*b^4))*(-((3*a^2 - b^2 - (a^3 - 3*a*b^2)/Sqr
t[-b^2])*Log[Sqrt[-b^2] - b*Tan[c + d*x]])/(2*(a^2 + b^2)^3) + ((3*a^2 - b^2)*Log[a + b*Tan[c + d*x]])/(a^2 +
b^2)^3 - ((3*a^2 - b^2 + (a^3 - 3*a*b^2)/Sqrt[-b^2])*Log[Sqrt[-b^2] + b*Tan[c + d*x]])/(2*(a^2 + b^2)^3) - 1/(
2*(a^2 + b^2)*(a + b*Tan[c + d*x])^2) - (2*a)/((a^2 + b^2)^2*(a + b*Tan[c + d*x]))) + 3*a*(3*a^2 + 11*b^2)*(-(
(2*a - (a^2 - b^2)/Sqrt[-b^2])*Log[Sqrt[-b^2] - b*Tan[c + d*x]])/(2*(a^2 + b^2)^2) + (2*a*Log[a + b*Tan[c + d*
x]])/(a^2 + b^2)^2 - ((2*a + (a^2 - b^2)/Sqrt[-b^2])*Log[Sqrt[-b^2] + b*Tan[c + d*x]])/(2*(a^2 + b^2)^2) - 1/(
(a^2 + b^2)*(a + b*Tan[c + d*x]))))/(2*b^2*(a^2 + b^2)))/(4*b^2*(a^2 + b^2))))/d

________________________________________________________________________________________

Maple [B]  time = 0.13, size = 824, normalized size = 2.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4/(a+b*tan(d*x+c))^3,x)

[Out]

-3/d*b^7/(a^2+b^2)^5*ln(a+b*tan(d*x+c))+3/2/d/(a^2+b^2)^5*ln(1+tan(d*x+c)^2)*b^7+3/8/d/(a^2+b^2)^5*arctan(tan(
d*x+c))*a^7+4/d/(a^2+b^2)^5/(1+tan(d*x+c)^2)^2*tan(d*x+c)^2*a^2*b^5+25/4/d/(a^2+b^2)^5/(1+tan(d*x+c)^2)^2*a^4*
b^3+17/4/d/(a^2+b^2)^5/(1+tan(d*x+c)^2)^2*a^2*b^5-21/2/d/(a^2+b^2)^5*ln(1+tan(d*x+c)^2)*a^2*b^5+3/8/d/(a^2+b^2
)^5/(1+tan(d*x+c)^2)^2*tan(d*x+c)^3*a^7-1/d/(a^2+b^2)^5/(1+tan(d*x+c)^2)^2*tan(d*x+c)^2*b^7+5/8/d/(a^2+b^2)^5/
(1+tan(d*x+c)^2)^2*tan(d*x+c)*a^7-105/8/d/(a^2+b^2)^5*arctan(tan(d*x+c))*a*b^6+21/8/d/(a^2+b^2)^5*arctan(tan(d
*x+c))*a^5*b^2-6/d*b^5/(a^2+b^2)^4*a/(a+b*tan(d*x+c))+21/d*b^5/(a^2+b^2)^5*ln(a+b*tan(d*x+c))*a^2+3/4/d/(a^2+b
^2)^5/(1+tan(d*x+c)^2)^2*a^6*b+105/8/d/(a^2+b^2)^5*arctan(tan(d*x+c))*a^3*b^4-1/2/d*b^5/(a^2+b^2)^3/(a+b*tan(d
*x+c))^2+21/8/d/(a^2+b^2)^5/(1+tan(d*x+c)^2)^2*tan(d*x+c)^3*a^5*b^2+5/d/(a^2+b^2)^5/(1+tan(d*x+c)^2)^2*tan(d*x
+c)^2*a^4*b^3+19/8/d/(a^2+b^2)^5/(1+tan(d*x+c)^2)^2*tan(d*x+c)*a^5*b^2-15/8/d/(a^2+b^2)^5/(1+tan(d*x+c)^2)^2*t
an(d*x+c)^3*a^3*b^4-33/8/d/(a^2+b^2)^5/(1+tan(d*x+c)^2)^2*tan(d*x+c)^3*a*b^6-5/4/d/(a^2+b^2)^5/(1+tan(d*x+c)^2
)^2*b^7-39/8/d/(a^2+b^2)^5/(1+tan(d*x+c)^2)^2*tan(d*x+c)*a*b^6-25/8/d/(a^2+b^2)^5/(1+tan(d*x+c)^2)^2*tan(d*x+c
)*a^3*b^4

________________________________________________________________________________________

Maxima [B]  time = 1.81573, size = 996, normalized size = 3.38 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a+b*tan(d*x+c))^3,x, algorithm="maxima")

[Out]

1/8*(3*(a^7 + 7*a^5*b^2 + 35*a^3*b^4 - 35*a*b^6)*(d*x + c)/(a^10 + 5*a^8*b^2 + 10*a^6*b^4 + 10*a^4*b^6 + 5*a^2
*b^8 + b^10) + 24*(7*a^2*b^5 - b^7)*log(b*tan(d*x + c) + a)/(a^10 + 5*a^8*b^2 + 10*a^6*b^4 + 10*a^4*b^6 + 5*a^
2*b^8 + b^10) - 12*(7*a^2*b^5 - b^7)*log(tan(d*x + c)^2 + 1)/(a^10 + 5*a^8*b^2 + 10*a^6*b^4 + 10*a^4*b^6 + 5*a
^2*b^8 + b^10) + (6*a^6*b + 44*a^4*b^3 - 62*a^2*b^5 - 4*b^7 + 3*(a^5*b^2 + 6*a^3*b^4 - 27*a*b^6)*tan(d*x + c)^
5 + 6*(a^6*b + 6*a^4*b^3 - 13*a^2*b^5 - 2*b^7)*tan(d*x + c)^4 + (3*a^7 + 23*a^5*b^2 + 61*a^3*b^4 - 151*a*b^6)*
tan(d*x + c)^3 + 2*(5*a^6*b + 37*a^4*b^3 - 73*a^2*b^5 - 9*b^7)*tan(d*x + c)^2 + (5*a^7 + 26*a^5*b^2 + 49*a^3*b
^4 - 68*a*b^6)*tan(d*x + c))/(a^10 + 4*a^8*b^2 + 6*a^6*b^4 + 4*a^4*b^6 + a^2*b^8 + (a^8*b^2 + 4*a^6*b^4 + 6*a^
4*b^6 + 4*a^2*b^8 + b^10)*tan(d*x + c)^6 + 2*(a^9*b + 4*a^7*b^3 + 6*a^5*b^5 + 4*a^3*b^7 + a*b^9)*tan(d*x + c)^
5 + (a^10 + 6*a^8*b^2 + 14*a^6*b^4 + 16*a^4*b^6 + 9*a^2*b^8 + 2*b^10)*tan(d*x + c)^4 + 4*(a^9*b + 4*a^7*b^3 +
6*a^5*b^5 + 4*a^3*b^7 + a*b^9)*tan(d*x + c)^3 + (2*a^10 + 9*a^8*b^2 + 16*a^6*b^4 + 14*a^4*b^6 + 6*a^2*b^8 + b^
10)*tan(d*x + c)^2 + 2*(a^9*b + 4*a^7*b^3 + 6*a^5*b^5 + 4*a^3*b^7 + a*b^9)*tan(d*x + c)))/d

________________________________________________________________________________________

Fricas [B]  time = 2.87083, size = 1497, normalized size = 5.07 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a+b*tan(d*x+c))^3,x, algorithm="fricas")

[Out]

-1/32*(9*a^6*b^3 + 95*a^4*b^5 - 141*a^2*b^7 - 3*b^9 - 8*(a^8*b + 4*a^6*b^3 + 6*a^4*b^5 + 4*a^2*b^7 + b^9)*cos(
d*x + c)^6 + 8*(a^8*b - 6*a^4*b^5 - 8*a^2*b^7 - 3*b^9)*cos(d*x + c)^4 - 12*(a^7*b^2 + 7*a^5*b^4 + 35*a^3*b^6 -
 35*a*b^8)*d*x - (15*a^8*b + 82*a^6*b^3 + 68*a^4*b^5 - 498*a^2*b^7 - 51*b^9 + 12*(a^9 + 6*a^7*b^2 + 28*a^5*b^4
 - 70*a^3*b^6 + 35*a*b^8)*d*x)*cos(d*x + c)^2 - 48*(7*a^2*b^7 - b^9 + (7*a^4*b^5 - 8*a^2*b^7 + b^9)*cos(d*x +
c)^2 + 2*(7*a^3*b^6 - a*b^8)*cos(d*x + c)*sin(d*x + c))*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(
d*x + c)^2 + b^2) - 2*(4*(a^9 + 4*a^7*b^2 + 6*a^5*b^4 + 4*a^3*b^6 + a*b^8)*cos(d*x + c)^5 + 2*(3*a^9 + 20*a^7*
b^2 + 42*a^5*b^4 + 36*a^3*b^6 + 11*a*b^8)*cos(d*x + c)^3 - (3*a^7*b^2 + 53*a^5*b^4 - 15*a^3*b^6 + 159*a*b^8 -
12*(a^8*b + 7*a^6*b^3 + 35*a^4*b^5 - 35*a^2*b^7)*d*x)*cos(d*x + c))*sin(d*x + c))/((a^12 + 4*a^10*b^2 + 5*a^8*
b^4 - 5*a^4*b^8 - 4*a^2*b^10 - b^12)*d*cos(d*x + c)^2 + 2*(a^11*b + 5*a^9*b^3 + 10*a^7*b^5 + 10*a^5*b^7 + 5*a^
3*b^9 + a*b^11)*d*cos(d*x + c)*sin(d*x + c) + (a^10*b^2 + 5*a^8*b^4 + 10*a^6*b^6 + 10*a^4*b^8 + 5*a^2*b^10 + b
^12)*d)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4/(a+b*tan(d*x+c))**3,x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [B]  time = 1.38893, size = 792, normalized size = 2.68 \begin{align*} \frac{\frac{3 \,{\left (a^{7} + 7 \, a^{5} b^{2} + 35 \, a^{3} b^{4} - 35 \, a b^{6}\right )}{\left (d x + c\right )}}{a^{10} + 5 \, a^{8} b^{2} + 10 \, a^{6} b^{4} + 10 \, a^{4} b^{6} + 5 \, a^{2} b^{8} + b^{10}} - \frac{12 \,{\left (7 \, a^{2} b^{5} - b^{7}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{10} + 5 \, a^{8} b^{2} + 10 \, a^{6} b^{4} + 10 \, a^{4} b^{6} + 5 \, a^{2} b^{8} + b^{10}} + \frac{24 \,{\left (7 \, a^{2} b^{6} - b^{8}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{10} b + 5 \, a^{8} b^{3} + 10 \, a^{6} b^{5} + 10 \, a^{4} b^{7} + 5 \, a^{2} b^{9} + b^{11}} + \frac{3 \, a^{5} b^{2} \tan \left (d x + c\right )^{5} + 18 \, a^{3} b^{4} \tan \left (d x + c\right )^{5} - 81 \, a b^{6} \tan \left (d x + c\right )^{5} + 6 \, a^{6} b \tan \left (d x + c\right )^{4} + 36 \, a^{4} b^{3} \tan \left (d x + c\right )^{4} - 78 \, a^{2} b^{5} \tan \left (d x + c\right )^{4} - 12 \, b^{7} \tan \left (d x + c\right )^{4} + 3 \, a^{7} \tan \left (d x + c\right )^{3} + 23 \, a^{5} b^{2} \tan \left (d x + c\right )^{3} + 61 \, a^{3} b^{4} \tan \left (d x + c\right )^{3} - 151 \, a b^{6} \tan \left (d x + c\right )^{3} + 10 \, a^{6} b \tan \left (d x + c\right )^{2} + 74 \, a^{4} b^{3} \tan \left (d x + c\right )^{2} - 146 \, a^{2} b^{5} \tan \left (d x + c\right )^{2} - 18 \, b^{7} \tan \left (d x + c\right )^{2} + 5 \, a^{7} \tan \left (d x + c\right ) + 26 \, a^{5} b^{2} \tan \left (d x + c\right ) + 49 \, a^{3} b^{4} \tan \left (d x + c\right ) - 68 \, a b^{6} \tan \left (d x + c\right ) + 6 \, a^{6} b + 44 \, a^{4} b^{3} - 62 \, a^{2} b^{5} - 4 \, b^{7}}{{\left (a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}\right )}{\left (b \tan \left (d x + c\right )^{3} + a \tan \left (d x + c\right )^{2} + b \tan \left (d x + c\right ) + a\right )}^{2}}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a+b*tan(d*x+c))^3,x, algorithm="giac")

[Out]

1/8*(3*(a^7 + 7*a^5*b^2 + 35*a^3*b^4 - 35*a*b^6)*(d*x + c)/(a^10 + 5*a^8*b^2 + 10*a^6*b^4 + 10*a^4*b^6 + 5*a^2
*b^8 + b^10) - 12*(7*a^2*b^5 - b^7)*log(tan(d*x + c)^2 + 1)/(a^10 + 5*a^8*b^2 + 10*a^6*b^4 + 10*a^4*b^6 + 5*a^
2*b^8 + b^10) + 24*(7*a^2*b^6 - b^8)*log(abs(b*tan(d*x + c) + a))/(a^10*b + 5*a^8*b^3 + 10*a^6*b^5 + 10*a^4*b^
7 + 5*a^2*b^9 + b^11) + (3*a^5*b^2*tan(d*x + c)^5 + 18*a^3*b^4*tan(d*x + c)^5 - 81*a*b^6*tan(d*x + c)^5 + 6*a^
6*b*tan(d*x + c)^4 + 36*a^4*b^3*tan(d*x + c)^4 - 78*a^2*b^5*tan(d*x + c)^4 - 12*b^7*tan(d*x + c)^4 + 3*a^7*tan
(d*x + c)^3 + 23*a^5*b^2*tan(d*x + c)^3 + 61*a^3*b^4*tan(d*x + c)^3 - 151*a*b^6*tan(d*x + c)^3 + 10*a^6*b*tan(
d*x + c)^2 + 74*a^4*b^3*tan(d*x + c)^2 - 146*a^2*b^5*tan(d*x + c)^2 - 18*b^7*tan(d*x + c)^2 + 5*a^7*tan(d*x +
c) + 26*a^5*b^2*tan(d*x + c) + 49*a^3*b^4*tan(d*x + c) - 68*a*b^6*tan(d*x + c) + 6*a^6*b + 44*a^4*b^3 - 62*a^2
*b^5 - 4*b^7)/((a^8 + 4*a^6*b^2 + 6*a^4*b^4 + 4*a^2*b^6 + b^8)*(b*tan(d*x + c)^3 + a*tan(d*x + c)^2 + b*tan(d*
x + c) + a)^2))/d